import dao.StudentMapper;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;
import pojo.Student;
import utils.MybatisUtils;

import java.util.List;

public class Mytest {
    @Test
    public void getStudentList() {
        SqlSession session = MybatisUtils.getSession();

        StudentMapper mapper = session.getMapper(StudentMapper.class);
        List<Student> students = mapper.getStudents();

        for (Student student: students){
            System.out.println(student);
        }
        session.close();
    }

}